/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.cinemasystem.app.modules.allscheduling_given.Impl;

import com.cinemasystem.app.modules.allscheduling_given.CalculateMovieDuration;
import java.util.Date;
import org.joda.time.DateTime;

/**
 *
 * @author 210226978
 */
public class CalculateMovieDurationImpl implements CalculateMovieDuration{

    @Override
    public String getMovieDuration(String duration, String startTime) {        
        int minutesDuration = Integer.parseInt(duration);
        DateTime dateStartTime = new DateTime(startTime);
        DateTime endTime = dateStartTime.plusMinutes(minutesDuration);        
        return endTime.toDate().toString();
    }
    
}
